#include <bits/stdc++.h>
using namespace std;
const int M = 1000000007, N = 1000005;
long long f[N];
int main() {
  int n;
  cin >> n;
  f[1] = 2;
  f[2] = 4;
  for (int i = 3; i <= n; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % M;
  }
  cout << f[n];
  return 0;
}